package com.alamiya.security.service;

import com.alamiya.security.entity.PublicUser;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Optional;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author hehaoqi
 * @since 2021-02-09
 */
public interface IPublicUserService extends IService<PublicUser> {

    /**
     * 根据登录的信息获取用户信息
     *
     * @param loginInfo 用户名/微信号/电话号码
     * @return
     */
    Optional<PublicUser> getOneWithRolesAndAuthorities(String loginInfo);

    /**
     * 获取当前登录的用户
     * @return
     */
    Optional<PublicUser> getUserWithAuthorities();
}
